﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin.Master" AutoEventWireup="true"
    CodeBehind="admin_newslist.aspx.cs" Inherits="Web.admin_newslist" %>

<asp:Content ID="mainContent" ContentPlaceHolderID="mainContent" runat="server">
    <div class="content-box">
        <!-- Start Content Box -->
        <div class="content-box-header">
            <h3>
                新闻管理</h3>
            <ul class="content-box-tabs">
                <li><a href="#tab1" class="default-tab">列表</a></li>
                <li><a href="admin_newsadd.aspx">添加</a></li>
            </ul>
            <div class="clear">
            </div>
        </div>
        <!-- End .content-box-header -->
        <div class="content-box-content">
            <div class="tab-content default-tab" id="tab1">
                <asp:ScriptManager ID="ScriptManager1" runat="server">
                </asp:ScriptManager>
                <asp:UpdatePanel ID="UpdatePanel1" runat="server" ChildrenAsTriggers="true">
                    <ContentTemplate>
                        <div class="notification success png_bg" id="noticesuccess" runat="server">
                            <a href="#" class="close">
                                <img src="resources/images/icons/cross_grey_small.png" title="Close this notification"
                                    alt="close" /></a>
                            <div>
                                操作已成功！
                            </div>
                        </div>
                        <div class="notification error png_bg" id="noticefailed" runat="server">
                            <a href="#" class="close">
                                <img src="resources/images/icons/cross_grey_small.png" title="Close this notification"
                                    alt="close" /></a>
                            <div>
                                操作失败！请重新尝试！
                            </div>
                        </div>
                        <table>
                            <thead>
                                <tr>
                                    <th>
                                        <input class="check-all" type="checkbox" />
                                    </th>
                                    <th>
                                        序号
                                    </th>
                                    <th>
                                        标题
                                    </th>
                                    <th>
                                        分类
                                    </th>
                                    <th>
                                        首页置顶
                                    </th>
                                    <th>
                                        操作
                                    </th>
                                </tr>
                            </thead>
                            <tfoot>
                                <tr>
                                    <td colspan="7">
                                        <div class="bulk-actions align-left">
                                            <asp:DropDownList ID="ddlChange" runat="server">
                                                <asp:ListItem Value="-1">选择操作</asp:ListItem>
                                                <%--<asp:ListItem Value="1">热门为是</asp:ListItem>
                                                <asp:ListItem Value="2">热门为否</asp:ListItem>--%>
                                                <asp:ListItem Value="3">删除</asp:ListItem>
                                            </asp:DropDownList>
                                            <asp:Button ID="btnChange" runat="server" Text="修改" CssClass="button" OnClick="btnChange_Click" />
                                        </div>
                                        <div class="pagination">
                                            <a href="?page=1">第一页</a>
                                            <asp:HyperLink ID="hlPre" runat="server">上一页</asp:HyperLink>
                                            <asp:Repeater ID="NewsListPage" runat="server">
                                                <ItemTemplate>
                                                    <a href="?page=<%# Container.DataItem.ToString() %>">
                                                        <%# Container.DataItem.ToString()%></a>
                                                </ItemTemplate>
                                            </asp:Repeater>
                                            <asp:HyperLink ID="hlNext" runat="server">下一页</asp:HyperLink>
                                            <asp:HyperLink ID="hlLast" runat="server">末页</asp:HyperLink>
                                        </div>
                                        <!-- End .pagination -->
                                        <div class="clear">
                                        </div>
                                    </td>
                                </tr>
                            </tfoot>
                            <tbody>
                                <asp:Repeater ID="NewsListRpt" runat="server">
                                    <ItemTemplate>
                                        <tr>
                                            <td>
                                                <input type="checkbox" name="ckb" value="<%# Eval("NewsID") %>" />
                                            </td>
                                            <td>
                                                <asp:Label ID="lbl_NewsID" runat="server" Text='<%# Eval("ShowID") %>'></asp:Label>
                                            </td>
                                            <td>
                                                <%# Eval("Title") %>
                                            </td>
                                            <td>
                                                <a href="?cid=<%# Eval("CategoryID")%>" title="title">
                                                    <%# Eval("CategoryName")%></a>
                                            </td>
                                            <td>
                                                <%# Eval("TopString")%>
                                            </td>
                                            <td>
                                                <!-- Icons -->
                                                <a href="admin_newsmodify.aspx?id=<%# Eval("NewsID") %>" title="Edit">
                                                    <img src="resources/images/icons/pencil.png" alt="Edit" /></a>
                                                <asp:ImageButton ID="ibtnDelete" runat="server" ToolTip='<%# Eval("NewsID") %>' OnClick="ibtnDelete_OnClick"
                                                    ImageUrl="resources/images/icons/cross.png" CssClass="deletebutton" />
                                            </td>
                                        </tr>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </tbody>
                        </table>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </div>
            <!-- End #tab1 -->
        </div>
        <!-- End .content-box-content -->
    </div>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="jsContent" runat="server">

    <script type="text/javascript" language="javascript">
    $(function() {
    initSideNav("nav-article","admin_newslist.aspx");
    });
    </script>

</asp:Content>
